chore: rename testing classes as new versions became reserved#477
Merged
chore: rename testing classes as new versions became reserved#477
Conversation
There was a problem hiding this comment.
Pull request overview
This PR renames testing classes from database-specific names (MysqlRecord, SqliteRecord) to more generic names (SecondaryRecord, LiteRecord) to avoid conflicts with reserved names in newer versions of Ruby/Rails. The changes are consistent across model files, schema files, test files, and configuration.
Changes:
- Renamed
MysqlRecord→SecondaryRecordandSqliteRecord→LiteRecordacross all model classes and test files - Updated database table names from
mysql_*→secondary_*andsqlite_*→lite_*in schema files - Updated database configuration key from
:sqlite→:lite - Updated Ruby version from 3.4.7 to 3.4.8
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/test_helper.rb | Updated DatabaseCleaner configuration to use new record class names |
| test/dummy/db/sqlite_schema.rb | Renamed sqlite table definitions to lite |
| test/dummy/db/secondary_schema.rb | Renamed mysql table definitions to secondary |
| test/dummy/db/schema.rb | Updated multi-database test table names to use new naming convention |
| test/dummy/db/mysql_schema.rb | Removed deprecated mysql schema file |
| test/dummy/config/database.yml | Renamed database configuration key from sqlite to lite |
| test/dummy/app/models/sqlite_record.rb | Removed old SqliteRecord class definition |
| test/dummy/app/models/secondary_tag.rb | Updated class to inherit from SecondaryRecord |
| test/dummy/app/models/secondary_record.rb | Renamed class from MysqlRecord to SecondaryRecord |
| test/dummy/app/models/secondary_adoptable_tag.rb | Updated class to inherit from SecondaryRecord |
| test/dummy/app/models/memory_tag.rb | Updated class to inherit from LiteRecord |
| test/dummy/app/models/memory_adoptable_tag.rb | Updated class to inherit from LiteRecord |
| test/dummy/app/models/lite_record.rb | Added new LiteRecord class replacing SqliteRecord |
| test/closure_tree/parallel_test.rb | Updated to use LiteRecord connection methods |
| test/closure_tree/multi_database_test.rb | Updated all references from SqliteRecord/MysqlRecord to LiteRecord/SecondaryRecord |
| test/closure_tree/adopt_test.rb | Updated adopt test invocations to use new class names |
| lib/closure_tree/support.rb | Updated comment to reference SecondaryRecord instead of MysqlRecord |
| .tool-versions | Updated Ruby version from 3.4.7 to 3.4.8 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The build started to fail because SqliteRecord is reserved in the new version of sqlite3.